<?php
/*
 +----------------------------------------------------------------------
 + Title        : MyRedis 控制器
 + Author       : Randy_chen
 + Version      : V1.0.0.1
 + Initial-Time : 2019/9/2 9:57
 + Last-time    : 2019/9/2 9:57+ 86187
 + Desc         : MyRedis
 +----------------------------------------------------------------------
*/


namespace app\common\lib;




class MyRedis
{
    public static function getInstance(){
        $redis = new \Redis();
        $config = config('cache.');
        $redis->connect($config['host'], $config['port']);
        if($config['password']){
            $redis->auth($config['password']);
        }
        return $redis;
    }
}